package model

type ShoppingCart struct {
	CartItemId int  `json:"cartItemId" gorm:"type:bigint;primary_key;not null;autoIncrement"`
	UserId     uint `json:"userId" gorm:"type:bigint;not null"`
	GoodsId    int  `json:"goodsId" gorm:"type:bigint;not null"`
	GoodsCount int  `json:"goodsCount" gorm:"type:int;not null"`
	IsDeleted  uint `json:"isDeleted" gorm:"type:tinyint;not null"`
	CreateTime Time `json:"createTime" gorm:"type:datetime;not null;default:current_timestamp"`
	UpdateTime Time `json:"updateTime" gorm:"type:datetime;not null;default:current_timestamp"`
}

// TableName 自定义表明，不适用默认的mall_users
func (receiver ShoppingCart) TableName() string {
	return "tb_newbee_mall_shopping_cart_item"
}
